package shun.demo.finalize;

import android.content.Context;

/**
 * Created by chen on 2/10/14.
 */
public class MyObject {

    private Context mContext;

    public MyObject(Context context) {
        mContext = context;
    }

    @Override
    public String toString() {

        return getClass().getSimpleName() + '@' + Integer.toHexString(hashCode());
    }

    @Override
    protected void finalize() throws Throwable {
        System.out.println("对象销毁：" + this + mContext);
    }
}
